1. Field of the Invention
This invention relates generally to semiconductor microcontrollers and more particularly to multi-input microcontroller wake up systems and methods.
2. Description of Background Art
Microcontrollers are microprocessors integrated with peripherals on a single integrated circuit. They are compact in size and yet retain the computational power of traditional microprocessors, allowing them to be used in a multitude of applications. For example, in a single household, microcontrollers are a part of microwave ovens, televisions, calculators, remote controls, clocks, etc. In a microwave oven, for example, the microcontroller senses the settings keyed in by the user and heats up food for the set time interval and power level. The microcontroller keeps track of real time and produces a notification signal, e.g., an audible tone, to notify the user when the heating is done. The microcontroller also displays the status of the microwave oven on a suitable display, typically an LCD or LED.
Microcontrollers are also used in automobiles. Every car has about twenty microcontrollers. In a car, microcontrollers are used in the engine control modules, the antilock braking systems, the sound systems, the airbags, and automobile suspension control modules, for example. In antilock braking systems, the microcontroller monitors the rotational speed of the tires through sensors attached to the tires. When the driver applies the brakes, the microcontroller determines whether any of the tires have locked. If any of the tires are locked, the microcontroller releases the brakes for that tire through a servo-mechanical device coupled to the brakes. Thus, the driver is able to steer the car during emergency braking situations without fear of having the tires lock and causing the car to skid or turn over.
A modern semiconductor microcontroller is a low-cost computer adapted to provide rapid solutions to external events after intensive computation. The microcontroller senses external events through signals received at input ports, and transmits responses to the events through its output ports. In order to provide this functionality, a typical microcontroller employs an on-chip Programmable Read Only Memory (PROM) to store its instructions, an on-chip data RAM to store the data temporarily, a Central Processing Unit (CPU) to execute the instructions stored in the PROM, an oscillator driver to generate the system clock, and other application-specific peripherals such as timers, interrupt handlers, watchdogs, analog comparators, etc
The microcontroller is used in automobile keyless entry, toys, and keyboard. For automobile keyless entry, the microcontroller is the brain of the remote control. For most of the time, the microcontroller is in sleep mode to save power. When the user pushes a button on the keyless entry remote control, the action will wake up the microcontroller. Then, the microcontroller scans the buttons and identifies which button has been pushed. After identifying which button has been pushed, the microcontroller generates a corresponding command to the main keyless entry control unit in the vehicle. Then, the vehicle will perform the proper action.
Therefore, a system or method is needed to wake up the microcontroller from sleep mode when the user pushes any button out of many keys. The same principal applies to toys and keyboard. For most of the time, the microcontroller is in sleep mode to save power. When the user pushes a button on the toy or keyboard, the action will wake up the microcontroller. Then, the microcontroller scans the buttons and figures out which button has been pushed. After knowing which button has been pushed, the microcontroller will perform the proper action. The microcontroller may generate sound or movement for toys. It may pass the selected command to the main processor in a keyboard.
Therefore, a system or method is needed to wake up the microcontroller from sleep mode when the user pushes any button out of many keys of the toys or keyboard. This system is called multi-input wake up.
Conventional systems compare the current value of an input pin, e.g., PIN_INPUT, of the microcontroller with an old value, e.g., PIN_DATA, that has be stored (latched) when the pin has been previously read. If they do not match, an interrupt signal can be generated. An interrupt service routine processes the interrupt and clears the interrupt by storing the new value of the pin into a data latch. Thereafter, the value of the input pin and the value of the data latch match. However if the default value of the button in the keyboard is represented as a logical zero, for example, the action of pushing the button will generate a logical one. Then, PIN_DATA should be set to logical zero by reading PIN_INPUT which is equal to a logical zero when the button is at default state. The microcontroller then goes into sleep mode to save power.
Other conventional systems requires the generation of two non-overlapping clock signals, e.g., CLKA and CLKP, from one or more clock sources to set a pending flag (WK_PND) representing the whether a valid signal transmit on a pin has been detected. The first clock signal, CLKA, is used by the ALU to write to the pending flag, WK_PND. The second clock signal, CLKP, is used by the edge detection circuit to set the pending flag when an input is received on the pins of the microcontroller, for example. The use of two clocks is necessary to avoid a conflict between an simultaneous ALU write operation to the pending flag and an edge detection write operation to the pending flag.
The use of multiple clocks to prevent potential conflicts is expensive in terms of the potential operating frequencies of the device, e.g., a microcontroller or microprocessor. The use of multiple clocks is inconsistent with more recent design methodologies that use a single clock signal for all of the registers on a chip. This is called single clock synchronous design methodology and allows the chip to operate at a higher frequencies when compared to designs using multiple clocks. In addition, the use of a single clock reduces the design cycle of semiconductor devices because the clocking scheme is not as complex.
What is needed is a system and method for using a single clock that is capable of receiving multiple inputs--some or all of which may be asynchronous--for example, a CPU and pins, detection transitions on these multiple inputs, ensuring that conflicts between the received signals are resolved, and generating a wake up signal in response to a transition in one of the multiple inputs.